/*
 * returnTab.java
 *
 * Created on 12 novembre 2008, 10:18
 */

package GUI;

import java.text.ParseException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import kernel.Car;
import kernel.Rental;

/**
 *
 * @author  coco
 */
public class returnTab extends javax.swing.JPanel {

    /** Creates new form returnTab */
    public returnTab() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        carDamageDialog = new javax.swing.JDialog();
        jScrollPane1 = new javax.swing.JScrollPane();
        DescriptionDamageField = new javax.swing.JTextArea();
        DescriptionDamageLabel = new javax.swing.JLabel();
        kundennumerDamageLabel = new javax.swing.JLabel();
        DatumDamageLabel = new javax.swing.JLabel();
        statusDamageLabel = new javax.swing.JLabel();
        kundennumerDamageField = new javax.swing.JFormattedTextField();
        DatumDamageField = new javax.swing.JFormattedTextField();
        statusDamageField = new javax.swing.JComboBox();
        SaveCarDamageDialog = new javax.swing.JButton();
        CancelCarDamageDialog = new javax.swing.JButton();
        returnTab = new javax.swing.JPanel();
        returnCarIdSearchLabel = new javax.swing.JLabel();
        returnCustomerPanel = new javax.swing.JPanel();
        returnCustomerSurnameLabel = new javax.swing.JLabel();
        returnCustomerSurnameInfo = new javax.swing.JLabel();
        returnCustomerAnredeLabel = new javax.swing.JLabel();
        returnCustomerAnredeInfo = new javax.swing.JLabel();
        returnCustomerFirstNameLabel = new javax.swing.JLabel();
        returnCustomerFirstNameInfo = new javax.swing.JLabel();
        returnCustomerBirthdayLabel = new javax.swing.JLabel();
        returnCustomerBirthdayInfo = new javax.swing.JLabel();
        returnCustomerLicenseDateLabel = new javax.swing.JLabel();
        returnCustomerLicenseDateInfo = new javax.swing.JLabel();
        returnCustomerLicenseClassLabel = new javax.swing.JLabel();
        returnCustomerLicenseClassInfo = new javax.swing.JLabel();
        returnCustomerIdLabel = new javax.swing.JLabel();
        returnCustomerIdInfo = new javax.swing.JLabel();
        returnCustomerAddressLabel = new javax.swing.JLabel();
        returnCustomerAddressInfo = new javax.swing.JLabel();
        returnCustomerPhoneInfo = new javax.swing.JLabel();
        returnCustomerCompanyLabel = new javax.swing.JLabel();
        returnCustomerCompanyInfo = new javax.swing.JLabel();
        returnCustomerDiscountLabel = new javax.swing.JLabel();
        returnCustomerDiscountInfo = new javax.swing.JLabel();
        returnCustomerPhoneLabel = new javax.swing.JLabel();
        returnCarPanel = new javax.swing.JPanel();
        returnCarManufacturerLabel = new javax.swing.JLabel();
        returnCarManufacturerInfo = new javax.swing.JLabel();
        returnCarModelInfo = new javax.swing.JLabel();
        returnCarModelName = new javax.swing.JLabel();
        returnCarIdInfo = new javax.swing.JLabel();
        returnCarIdLabel = new javax.swing.JLabel();
        returnCarClassLabel = new javax.swing.JLabel();
        returnCarClassInfo = new javax.swing.JLabel();
        returnCarSeatsLabel = new javax.swing.JLabel();
        returnCarSeatsInfo = new javax.swing.JLabel();
        returnCarPlateLabel = new javax.swing.JLabel();
        returnCarPlateInfo = new javax.swing.JLabel();
        returnCarKmLabel = new javax.swing.JLabel();
        returnCarKmInfo = new javax.swing.JLabel();
        returnCarErstzulassungLabel = new javax.swing.JLabel();
        returnCarErstzulassungInfo = new javax.swing.JLabel();
        returnCarFuelInfo = new javax.swing.JLabel();
        returnCarFuelLabel = new javax.swing.JLabel();
        returnCarPriceFactorInfo = new javax.swing.JLabel();
        returnCarPriceFactorLabel = new javax.swing.JLabel();
        returnCarPickupLabel = new javax.swing.JLabel();
        returnCarReturnLabel = new javax.swing.JLabel();
        returnCarReturnField = new javax.swing.JTextField();
        returnCarFreeKmLabel = new javax.swing.JLabel();
        returnCarPriceField = new javax.swing.JTextField();
        returnCarPriceLabel = new javax.swing.JLabel();
        returnCarPayMethodLabel = new javax.swing.JLabel();
        returnCarPayMethodField = new javax.swing.JTextField();
        returnCarPayStatusLabel = new javax.swing.JLabel();
        returnCarPayStatusBox = new javax.swing.JComboBox();
        returnCarPickupInfo = new javax.swing.JLabel();
        returnCarStatusLabel = new javax.swing.JLabel();
        returnCarAddDamageButton = new javax.swing.JComboBox();
        returnCarNewDamage = new javax.swing.JButton();
        returnCarKmInfo1 = new javax.swing.JLabel();
        returnSearchButton = new javax.swing.JButton();
        returnCarIdSearchField = new javax.swing.JFormattedTextField();
        returnOkButton = new javax.swing.JButton();

        carDamageDialog.setTitle("Schadenhistorie"); // NOI18N
        carDamageDialog.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                carDamageDialogWindowClosing(evt);
            }
        });

        DescriptionDamageField.setColumns(20);
        DescriptionDamageField.setRows(5);
        jScrollPane1.setViewportView(DescriptionDamageField);

        DescriptionDamageLabel.setText("Beschreibung:"); // NOI18N

        kundennumerDamageLabel.setText("Kundennummer"); // NOI18N

        DatumDamageLabel.setText("Datum"); // NOI18N

        statusDamageLabel.setText("Status"); // NOI18N

        try {
            DatumDamageField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.##.####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        statusDamageField.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4" }));
        statusDamageField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                statusDamageFieldActionPerformed(evt);
            }
        });

        SaveCarDamageDialog.setText("Speichern"); // NOI18N
        SaveCarDamageDialog.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SaveCarDamageDialogActionPerformed(evt);
            }
        });

        CancelCarDamageDialog.setText("Abbrechen"); // NOI18N
        CancelCarDamageDialog.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CancelCarDamageDialogActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout carDamageDialogLayout = new javax.swing.GroupLayout(carDamageDialog.getContentPane());
        carDamageDialog.getContentPane().setLayout(carDamageDialogLayout);
        carDamageDialogLayout.setHorizontalGroup(
            carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(carDamageDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(carDamageDialogLayout.createSequentialGroup()
                        .addGroup(carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(DescriptionDamageLabel)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
                            .addGroup(carDamageDialogLayout.createSequentialGroup()
                                .addGroup(carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(kundennumerDamageLabel)
                                    .addComponent(DatumDamageLabel)
                                    .addComponent(statusDamageLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(statusDamageField, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(DatumDamageField)
                                    .addComponent(kundennumerDamageField, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE))))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, carDamageDialogLayout.createSequentialGroup()
                        .addComponent(CancelCarDamageDialog)
                        .addGap(32, 32, 32)
                        .addComponent(SaveCarDamageDialog)
                        .addGap(109, 109, 109))))
        );
        carDamageDialogLayout.setVerticalGroup(
            carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(carDamageDialogLayout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addGroup(carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(kundennumerDamageLabel)
                    .addComponent(kundennumerDamageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(DatumDamageLabel)
                    .addComponent(DatumDamageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusDamageLabel)
                    .addComponent(statusDamageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(DescriptionDamageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carDamageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(SaveCarDamageDialog)
                    .addComponent(CancelCarDamageDialog))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        returnCarIdSearchLabel.setText("Fahrzeugnummer"); // NOI18N

        returnCustomerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Kunde"));

        returnCustomerSurnameLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerSurnameLabel.setText("Nachname:"); // NOI18N

        returnCustomerAnredeLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerAnredeLabel.setText("Anrede:"); // NOI18N

        returnCustomerFirstNameLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerFirstNameLabel.setText("Vorname:"); // NOI18N

        returnCustomerBirthdayLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerBirthdayLabel.setText("Geburtsdatum:"); // NOI18N

        returnCustomerLicenseDateLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerLicenseDateLabel.setText("Führerscheindatum:"); // NOI18N

        returnCustomerLicenseClassLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerLicenseClassLabel.setText("Führerscheinklassen:"); // NOI18N

        returnCustomerIdLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerIdLabel.setText("Kundennummer:"); // NOI18N

        returnCustomerAddressLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerAddressLabel.setText("Adresse:"); // NOI18N

        returnCustomerCompanyLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerCompanyLabel.setText("Firmenname:"); // NOI18N

        returnCustomerDiscountLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerDiscountLabel.setText("Rabatfaktor:"); // NOI18N

        returnCustomerPhoneLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCustomerPhoneLabel.setText("Telefonnummer:"); // NOI18N

        javax.swing.GroupLayout returnCustomerPanelLayout = new javax.swing.GroupLayout(returnCustomerPanel);
        returnCustomerPanel.setLayout(returnCustomerPanelLayout);
        returnCustomerPanelLayout.setHorizontalGroup(
            returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(returnCustomerPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(returnCustomerCompanyLabel)
                    .addComponent(returnCustomerAnredeLabel)
                    .addComponent(returnCustomerBirthdayLabel)
                    .addComponent(returnCustomerLicenseDateLabel)
                    .addComponent(returnCustomerAddressLabel))
                .addGap(18, 18, 18)
                .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(returnCustomerPanelLayout.createSequentialGroup()
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(returnCustomerBirthdayInfo)
                            .addComponent(returnCustomerLicenseDateInfo)
                            .addComponent(returnCustomerAnredeInfo))
                        .addGap(126, 126, 126)
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(returnCustomerPhoneLabel)
                            .addComponent(returnCustomerLicenseClassLabel)
                            .addComponent(returnCustomerSurnameLabel)
                            .addComponent(returnCustomerFirstNameLabel))
                        .addGap(28, 28, 28)
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(returnCustomerLicenseClassInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(returnCustomerPhoneInfo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(returnCustomerSurnameInfo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(returnCustomerFirstNameInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(returnCustomerIdLabel)
                            .addComponent(returnCustomerDiscountLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(returnCustomerDiscountInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(returnCustomerIdInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(returnCustomerCompanyInfo)
                    .addComponent(returnCustomerAddressInfo))
                .addContainerGap(363, Short.MAX_VALUE))
        );
        returnCustomerPanelLayout.setVerticalGroup(
            returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(returnCustomerPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(returnCustomerPanelLayout.createSequentialGroup()
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(returnCustomerCompanyLabel)
                            .addComponent(returnCustomerCompanyInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(returnCustomerAnredeLabel)
                            .addComponent(returnCustomerAnredeInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(returnCustomerBirthdayLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(returnCustomerBirthdayInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(returnCustomerLicenseDateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(returnCustomerLicenseDateInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(returnCustomerPanelLayout.createSequentialGroup()
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(returnCustomerSurnameLabel)
                            .addComponent(returnCustomerSurnameInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(returnCustomerIdLabel)
                            .addGroup(returnCustomerPanelLayout.createSequentialGroup()
                                .addGap(1, 1, 1)
                                .addComponent(returnCustomerIdInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(returnCustomerPanelLayout.createSequentialGroup()
                                .addGap(1, 1, 1)
                                .addComponent(returnCustomerFirstNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(returnCustomerFirstNameInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, returnCustomerPanelLayout.createSequentialGroup()
                                .addComponent(returnCustomerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(returnCustomerLicenseClassLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, returnCustomerPanelLayout.createSequentialGroup()
                                .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(returnCustomerDiscountLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 14, Short.MAX_VALUE)
                                    .addComponent(returnCustomerPhoneInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 14, Short.MAX_VALUE)
                                    .addComponent(returnCustomerDiscountInfo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 14, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(returnCustomerLicenseClassInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(5, 5, 5)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(returnCustomerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(returnCustomerAddressLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(returnCustomerAddressInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(22, 22, 22))
        );

        returnCarPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Auto"));
        returnCarPanel.setMaximumSize(null);

        returnCarManufacturerLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarManufacturerLabel.setText("Hersteller:"); // NOI18N

        returnCarModelName.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarModelName.setText("Modellbezeichnung:"); // NOI18N

        returnCarIdLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarIdLabel.setText("Farhzeugnummer:"); // NOI18N

        returnCarClassLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarClassLabel.setText("Fahrzeugklasse:"); // NOI18N

        returnCarSeatsLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarSeatsLabel.setText("Sitzplätze:"); // NOI18N

        returnCarPlateLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarPlateLabel.setText("Kennzeichen:"); // NOI18N

        returnCarKmLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarKmLabel.setText("Kilometerstand:"); // NOI18N

        returnCarErstzulassungLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarErstzulassungLabel.setText("Erstzulassung:"); // NOI18N

        returnCarFuelLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarFuelLabel.setText("Kraftstofftyp:"); // NOI18N

        returnCarPriceFactorLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarPriceFactorLabel.setText("Preisfaktor:"); // NOI18N

        returnCarPickupLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarPickupLabel.setText("Verleihdatum:"); // NOI18N

        returnCarReturnLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarReturnLabel.setText("Rückgabedatum"); // NOI18N

        returnCarFreeKmLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarFreeKmLabel.setText("Freikilometer:"); // NOI18N

        returnCarPriceLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarPriceLabel.setText("Preis:"); // NOI18N

        returnCarPayMethodLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarPayMethodLabel.setText("Bezahlart:"); // NOI18N

        returnCarPayMethodField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnCarPayMethodFieldActionPerformed(evt);
            }
        });

        returnCarPayStatusLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarPayStatusLabel.setText("Bezahstatus:"); // NOI18N

        returnCarPayStatusBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4" }));
        returnCarPayStatusBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnCarPayStatusBoxActionPerformed(evt);
            }
        });

        returnCarStatusLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        returnCarStatusLabel.setText("Fahrzeugstatus:"); // NOI18N

        returnCarAddDamageButton.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Verfügbar", "Verliehen ", "Reparatur ", "nicht verleihbar" }));
        returnCarAddDamageButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnCarAddDamageButtonActionPerformed(evt);
            }
        });

        returnCarNewDamage.setText("Neue Schäden"); // NOI18N
        returnCarNewDamage.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnCarNewDamageActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout returnCarPanelLayout = new javax.swing.GroupLayout(returnCarPanel);
        returnCarPanel.setLayout(returnCarPanelLayout);
        returnCarPanelLayout.setHorizontalGroup(
            returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(returnCarPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                        .addComponent(returnCarPlateLabel)
                        .addGap(30, 30, 30)
                        .addComponent(returnCarPlateInfo))
                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                        .addComponent(returnCarManufacturerLabel)
                        .addGap(30, 30, 30)
                        .addComponent(returnCarManufacturerInfo))
                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                        .addComponent(returnCarFuelLabel)
                        .addGap(30, 30, 30)
                        .addComponent(returnCarFuelInfo))
                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                        .addComponent(returnCarPickupLabel)
                        .addGap(30, 30, 30)
                        .addComponent(returnCarPickupInfo))
                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                        .addComponent(returnCarPriceLabel)
                        .addGap(28, 28, 28)
                        .addComponent(returnCarPriceField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                        .addComponent(returnCarStatusLabel)
                        .addGap(28, 28, 28)
                        .addComponent(returnCarAddDamageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                        .addGap(90, 90, 90)
                        .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                                        .addComponent(returnCarModelName)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(returnCarModelInfo))
                                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                                        .addComponent(returnCarIdLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(returnCarIdInfo))
                                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(returnCarReturnLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(returnCarReturnField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                                        .addComponent(returnCarPayMethodLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(returnCarPayMethodField, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(90, 90, 90)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                                        .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                                .addComponent(returnCarClassLabel)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(returnCarClassInfo))
                                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                                .addComponent(returnCarKmLabel)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(returnCarKmInfo)))
                                        .addGap(147, 147, 147)
                                        .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                                .addComponent(returnCarErstzulassungLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(returnCarErstzulassungInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 22, Short.MAX_VALUE))
                                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                                .addComponent(returnCarSeatsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(returnCarSeatsInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                                        .addComponent(returnCarPayStatusLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(returnCarPayStatusBox, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(returnCarFreeKmLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(returnCarKmInfo1))))
                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                .addComponent(returnCarPriceFactorLabel)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(returnCarPriceFactorInfo))))
                    .addGroup(returnCarPanelLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 663, Short.MAX_VALUE)
                        .addComponent(returnCarNewDamage, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        returnCarPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {returnCarFuelLabel, returnCarManufacturerLabel, returnCarPickupLabel, returnCarPlateLabel, returnCarPriceLabel, returnCarStatusLabel});

        returnCarPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {returnCarIdLabel, returnCarModelName, returnCarPayMethodLabel, returnCarPriceFactorLabel, returnCarReturnLabel});

        returnCarPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {returnCarClassLabel, returnCarFreeKmLabel, returnCarKmLabel, returnCarPayStatusLabel});

        returnCarPanelLayout.setVerticalGroup(
            returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(returnCarPanelLayout.createSequentialGroup()
                .addContainerGap(20, Short.MAX_VALUE)
                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, returnCarPanelLayout.createSequentialGroup()
                        .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarIdLabel)
                                    .addComponent(returnCarIdInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarModelName)
                                    .addComponent(returnCarModelInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarPriceFactorLabel)
                                    .addComponent(returnCarPriceFactorInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarReturnField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(returnCarReturnLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarPayMethodLabel)
                                    .addComponent(returnCarPayMethodField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarPlateInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(returnCarPlateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarManufacturerInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(returnCarManufacturerLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarFuelInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(returnCarFuelLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarPickupInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(returnCarPickupLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarPriceField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(returnCarPriceLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarAddDamageButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(returnCarStatusLabel)))
                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarKmInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(returnCarKmLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarClassLabel)
                                    .addComponent(returnCarClassInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(26, 26, 26)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarFreeKmLabel)
                                    .addComponent(returnCarKmInfo1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(returnCarPayStatusLabel)
                                    .addComponent(returnCarPayStatusBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(18, 18, 18))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, returnCarPanelLayout.createSequentialGroup()
                        .addGroup(returnCarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                .addComponent(returnCarErstzulassungLabel)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(returnCarSeatsLabel))
                            .addGroup(returnCarPanelLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(returnCarErstzulassungInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(returnCarSeatsInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(78, 78, 78)
                        .addComponent(returnCarNewDamage)
                        .addContainerGap())))
        );

        returnSearchButton.setText("Suchen"); // NOI18N
        returnSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnSearchButtonActionPerformed(evt);
            }
        });

        returnCarIdSearchField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));

        returnOkButton.setText("Zurückgeben"); // NOI18N
        returnOkButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnOkButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout returnTabLayout = new javax.swing.GroupLayout(returnTab);
        returnTab.setLayout(returnTabLayout);
        returnTabLayout.setHorizontalGroup(
            returnTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(returnTabLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(returnCarIdSearchLabel)
                .addGap(18, 18, 18)
                .addComponent(returnCarIdSearchField, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(returnSearchButton)
                .addContainerGap(830, Short.MAX_VALUE))
            .addComponent(returnCustomerPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(returnCarPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, returnTabLayout.createSequentialGroup()
                .addContainerGap(973, Short.MAX_VALUE)
                .addComponent(returnOkButton)
                .addContainerGap())
        );
        returnTabLayout.setVerticalGroup(
            returnTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(returnTabLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(returnTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(returnCarIdSearchField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(returnSearchButton)
                    .addComponent(returnCarIdSearchLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(returnCustomerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(returnCarPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(returnOkButton)
                .addContainerGap(203, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1100, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(returnTab, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 650, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(1, 1, 1)
                    .addComponent(returnTab, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGap(2, 2, 2)))
        );
    }// </editor-fold>//GEN-END:initComponents

private void returnCarPayStatusBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnCarPayStatusBoxActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_returnCarPayStatusBoxActionPerformed

private void returnCarAddDamageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnCarAddDamageButtonActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_returnCarAddDamageButtonActionPerformed

private void returnCarNewDamageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnCarNewDamageActionPerformed

        carDamageDialog.setSize(400,504);
        carDamageDialog.setResizable(false);
        carDamageDialog.setTitle("Schadenhistorie");
        carDamageDialog.setLocationRelativeTo(null);
                carDamageDialog.setVisible(true);
        this.setEnabled(false);
}//GEN-LAST:event_returnCarNewDamageActionPerformed

private void CancelCarDamageDialogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CancelCarDamageDialogActionPerformed
    carDamageDialog.setVisible(false);
    this.setEnabled(true);
}//GEN-LAST:event_CancelCarDamageDialogActionPerformed

private void carDamageDialogWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_carDamageDialogWindowClosing
    carDamageDialog.setVisible(false);
    this.setEnabled(true);
}//GEN-LAST:event_carDamageDialogWindowClosing

private void statusDamageFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_statusDamageFieldActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_statusDamageFieldActionPerformed

private void SaveCarDamageDialogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SaveCarDamageDialogActionPerformed
    if(DatumDamageField.getText().equals("  .  .    ")){DatumDamageField.setText("01.01.0001");}
    if ( kundennumerDamageField.getText().equals("") ){
     JOptionPane.showMessageDialog(null, "Sie müssen das kundennumer angeben","ERROR",JOptionPane.ERROR_MESSAGE) ;
}

else{
 String zuruck = null;// TODO add your handling code here:
            try {
                // TODO add your handling code here:
                zuruck = Car.newDamage(GUI.LoginWindow.sessionID, returnCarIdInfo.getText(), kundennumerDamageField.getText(), DatumDamageField.getText(), statusDamageField.getSelectedItem().toString(), DescriptionDamageField.getText());
            } catch (ParseException ex) {
                Logger.getLogger(returnTab.class.getName()).log(Level.SEVERE, null, ex);
            }
                JOptionPane.showMessageDialog(null, "Ihr Schade wurde hinzugefügt","Neue Schade",JOptionPane.INFORMATION_MESSAGE) ;

        carDamageDialog.setVisible(false);
}
    
}//GEN-LAST:event_SaveCarDamageDialogActionPerformed

private void returnSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnSearchButtonActionPerformed
        String données[][];
        String donnees2[][];
        String donnees3[][] = null;
        données=kernel.Car.searchcarbyid(GUI.LoginWindow.sessionID,returnCarIdSearchField.getText());
        if(données!=null){
        returnCarIdInfo.setText(données[0][0]);
        returnCarPlateInfo.setText(données[0][4]);  
        returnCarManufacturerInfo.setText(données[0][2]);
        returnCarFuelInfo.setText(données[0][9]);
        returnCarModelInfo.setText(données[0][3]);
        returnCarPriceFactorInfo.setText(données[0][10]);
        returnCarKmInfo.setText(données[0][7]);
        returnCarClassInfo.setText(données[0][1]);
        returnCarSeatsInfo.setText(données[0][6]);
        returnCarErstzulassungInfo.setText(données[0][8]);
        donnees2=kernel.Rental.searchrent(GUI.LoginWindow.sessionID,données[0][0]);
        verleihid=donnees2[0][0];
        returnCarPickupInfo.setText(donnees2[0][4]);
         returnCarPriceField.setText(donnees2[0][7]);
         returnCarReturnField.setText(donnees2[0][5]);
         returnCarPayMethodField.setText(donnees2[0][9]);
         returnCarKmInfo1.setText(donnees2[0][6]);
         returnCarPayStatusBox.setSelectedItem(donnees2[0][8]);
            try {
                donnees3 = kernel.Customer.searchcustomer(GUI.LoginWindow.sessionID, Integer.parseInt(donnees2[0][1]),"");
                System.out.println(donnees2[0][1]);
            } catch (ParseException ex) {
                Logger.getLogger(returnTab.class.getName()).log(Level.SEVERE, null, ex);
            }
         System.out.println(donnees3[0][0]);
        returnCustomerAnredeInfo.setText(donnees3[0][1]);
        returnCustomerBirthdayInfo.setText(donnees3[0][4]);
         returnCustomerLicenseDateInfo.setText(donnees3[0][8]);
         returnCustomerAddressInfo.setText(donnees3[0][5]);
         returnCustomerSurnameInfo.setText(donnees3[0][2]);
         returnCustomerLicenseClassInfo.setText(donnees3[0][7]);
         returnCustomerFirstNameInfo.setText(donnees3[0][3]);
         returnCustomerDiscountInfo.setText(donnees3[0][9]);
         returnCustomerPhoneInfo.setText(donnees3[0][6]);
         returnCustomerIdInfo.setText(donnees3[0][0]);

         // PROBLEM FIRMA
         returnCustomerCompanyLabel.setVisible(false);
         returnCustomerCompanyInfo.setVisible(false);
        }
        else{JOptionPane.showMessageDialog(null, "Es gibt kein Verleihverwaltung für diese Fahrzeug","ERROR",JOptionPane.ERROR_MESSAGE) ;}
      
}//GEN-LAST:event_returnSearchButtonActionPerformed

private void returnOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnOkButtonActionPerformed
    String zuruck=  Rental.updateRental(GUI.LoginWindow.sessionID,returnCarIdInfo.getText(),returnCarPickupInfo.getText(),returnCarReturnField.getText(),returnCarKmInfo1.getText(),returnCarPriceField.getText(),returnCarPayStatusBox.getSelectedItem().toString(),returnCarPayMethodField.getText());
    if(zuruck.equals("1")){     JOptionPane.showMessageDialog(null, "Sie wurden ausgeloggt!Bitte versuchen Sie sich wieder einzuloggen","ERROR",JOptionPane.ERROR_MESSAGE) ;}

    else{
        JOptionPane.showMessageDialog(null, "Der Verleihverwaltung wurde modifiert","modifier verleih",JOptionPane.INFORMATION_MESSAGE) ;
    }
}//GEN-LAST:event_returnOkButtonActionPerformed

private void returnCarPayMethodFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnCarPayMethodFieldActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_returnCarPayMethodFieldActionPerformed

public static String verleihid;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton CancelCarDamageDialog;
    public javax.swing.JFormattedTextField DatumDamageField;
    private javax.swing.JLabel DatumDamageLabel;
    public javax.swing.JTextArea DescriptionDamageField;
    private javax.swing.JLabel DescriptionDamageLabel;
    private javax.swing.JButton SaveCarDamageDialog;
    private javax.swing.JDialog carDamageDialog;
    private javax.swing.JScrollPane jScrollPane1;
    public javax.swing.JFormattedTextField kundennumerDamageField;
    private javax.swing.JLabel kundennumerDamageLabel;
    private javax.swing.JComboBox returnCarAddDamageButton;
    private javax.swing.JLabel returnCarClassInfo;
    private javax.swing.JLabel returnCarClassLabel;
    private javax.swing.JLabel returnCarErstzulassungInfo;
    private javax.swing.JLabel returnCarErstzulassungLabel;
    private javax.swing.JLabel returnCarFreeKmLabel;
    private javax.swing.JLabel returnCarFuelInfo;
    private javax.swing.JLabel returnCarFuelLabel;
    private javax.swing.JLabel returnCarIdInfo;
    private javax.swing.JLabel returnCarIdLabel;
    private javax.swing.JFormattedTextField returnCarIdSearchField;
    private javax.swing.JLabel returnCarIdSearchLabel;
    private javax.swing.JLabel returnCarKmInfo;
    private javax.swing.JLabel returnCarKmInfo1;
    private javax.swing.JLabel returnCarKmLabel;
    private javax.swing.JLabel returnCarManufacturerInfo;
    private javax.swing.JLabel returnCarManufacturerLabel;
    private javax.swing.JLabel returnCarModelInfo;
    private javax.swing.JLabel returnCarModelName;
    private javax.swing.JButton returnCarNewDamage;
    private javax.swing.JPanel returnCarPanel;
    private javax.swing.JTextField returnCarPayMethodField;
    private javax.swing.JLabel returnCarPayMethodLabel;
    private javax.swing.JComboBox returnCarPayStatusBox;
    private javax.swing.JLabel returnCarPayStatusLabel;
    private javax.swing.JLabel returnCarPickupInfo;
    private javax.swing.JLabel returnCarPickupLabel;
    private javax.swing.JLabel returnCarPlateInfo;
    private javax.swing.JLabel returnCarPlateLabel;
    private javax.swing.JLabel returnCarPriceFactorInfo;
    private javax.swing.JLabel returnCarPriceFactorLabel;
    private javax.swing.JTextField returnCarPriceField;
    private javax.swing.JLabel returnCarPriceLabel;
    private javax.swing.JTextField returnCarReturnField;
    private javax.swing.JLabel returnCarReturnLabel;
    private javax.swing.JLabel returnCarSeatsInfo;
    private javax.swing.JLabel returnCarSeatsLabel;
    private javax.swing.JLabel returnCarStatusLabel;
    private javax.swing.JLabel returnCustomerAddressInfo;
    private javax.swing.JLabel returnCustomerAddressLabel;
    private javax.swing.JLabel returnCustomerAnredeInfo;
    private javax.swing.JLabel returnCustomerAnredeLabel;
    private javax.swing.JLabel returnCustomerBirthdayInfo;
    private javax.swing.JLabel returnCustomerBirthdayLabel;
    private javax.swing.JLabel returnCustomerCompanyInfo;
    private javax.swing.JLabel returnCustomerCompanyLabel;
    private javax.swing.JLabel returnCustomerDiscountInfo;
    private javax.swing.JLabel returnCustomerDiscountLabel;
    private javax.swing.JLabel returnCustomerFirstNameInfo;
    private javax.swing.JLabel returnCustomerFirstNameLabel;
    private javax.swing.JLabel returnCustomerIdInfo;
    private javax.swing.JLabel returnCustomerIdLabel;
    private javax.swing.JLabel returnCustomerLicenseClassInfo;
    private javax.swing.JLabel returnCustomerLicenseClassLabel;
    private javax.swing.JLabel returnCustomerLicenseDateInfo;
    private javax.swing.JLabel returnCustomerLicenseDateLabel;
    private javax.swing.JPanel returnCustomerPanel;
    private javax.swing.JLabel returnCustomerPhoneInfo;
    private javax.swing.JLabel returnCustomerPhoneLabel;
    private javax.swing.JLabel returnCustomerSurnameInfo;
    private javax.swing.JLabel returnCustomerSurnameLabel;
    private javax.swing.JButton returnOkButton;
    private javax.swing.JButton returnSearchButton;
    private javax.swing.JPanel returnTab;
    public javax.swing.JComboBox statusDamageField;
    private javax.swing.JLabel statusDamageLabel;
    // End of variables declaration//GEN-END:variables

}
